<?php

use PHPUnit\Framework\TestCase as UnitTest ;
use EpgApp\bootstrap;
use EpgApp\modules\sdks\Image\base\ImageCreator;
use Curl\Curl;
/**
 * Class BootstrapTest
 * @covers bootstrap
 */
class BootstrapTest extends UnitTest
{
    public function testEmpty()
    {
        /**
         * @var bootstrap $epg_loader
         */
        global  $epg_loader ;

        $this->assertNotEmpty($epg_loader);

        return $epg_loader ;
    }

    public function testRegisterSpl()
    {
        /**
         * @var bootstrap $epg_loader
         */
        global  $epg_loader ;
        $this->assertEquals($epg_loader->registerSpl(),$epg_loader,'no equals to bootstrap Object');

    }

    public function testAutoloadClass()
    {
        /**
         * @var bootstrap $epg_loader
         */
        $creator = new ImageCreator(__DIR__.DS.'ImageException.png');
        $this->assertNotEmpty($creator);
        $this->assertObjectHasAttribute('_creator',$creator);
        $this->assertNotEmpty($creator::DBENGIN);
    }

    public function testAutoloadCurl()
    {
        $http = new Curl();
        $this->assertNotEmpty($http);

    }
}